<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="jquery-2.0.0.min.js"></script>
    <style>
         * {
      margin: 0;
      padding: 0;
    }
    img{
        width: 300px;
        height: 300px;
        
        
    }
    ul li{
        list-style:none;
        display: inline-flex;
        margin: 6px;
    }
    #cen{
        width: 950px;
        height: 630px;
        display: inline-flex;
        border: solid 2px;
        margin: 3px;
    }
    
    </style>
</head>
<body>
    <script>
    $(function(){
        $("#btn").click(function(){
            $("#cen>ul>li:last").hide(500,function f1(){
                $(this).prev().hide(500,f1);
            });
           
        })

        $("#btn1").click(function(){
            $("#cen>ul>li:first").show(500,function f1(){
                $(this).next().show(500,f1);
            });
           
        })
        
    })
    </script>
    <input type="button" id="btn" value="消失">
    <input type="button" id="btn1" value="显示">
    <div id="cen">
        <ul id="center">
            <li><a href=""><img src="./images/1.jpg" alt=""></a></li>
            <li><a href=""><img src="./images/2.jpg" alt=""></a></li>
            <li><a href=""><img src="./images/3.jpg" alt=""></a></li>
            <li><a href=""><img src="./images/1.jpg" alt=""></a></li>
            <li><a href=""><img src="./images/3.jpg" alt=""></a></li>
            <li><a href=""><img src="./images/1.jpg" alt=""></a></li>
        </ul >
    </div>
</body>
</html>